import { ref } from "vue"

export default function useExpand() {

    const isExpand = ref(false)
    const isLineBreak = ref(false) // 记录的是 footer 底部的聊天框是否高度改变

    const onShowExpand = () => {
        isExpand.value = !isExpand.value
    }
    const onChangeLineBreak = () => {
        isLineBreak.value = !isLineBreak.value
    }
    // 上传图片
    function onUploadFn() {
    }

    // 调用摄像头
    function onCameraFn() {
    }

    // 发送定位
    function onSendLocationFn() {
    }

    function onSendMessage() {
        console.log('发送消息');
    }

    return {
        isExpand,
        isLineBreak,
        onChangeLineBreak,
        onShowExpand,
        onUploadFn,
        onCameraFn,
        onSendLocationFn,
        onSendMessage
    }
}